import { onMounted, ref } from 'vue'
import { getInfo } from '../../api/house'
// 获取所有分类 
export const useHouseAllList = (type = false) => {
  const houseList = ref([])
  // 定义方法
  const useHouseAllList = async () => {
    let res = await getInfo()
    // console.log(res);
    houseList.value = res.data
    if (type) houseList.value.unshift({ code: 'all', name: '所有小区' })
    // console.log(houseList);
  }
  onMounted(() => {
    useHouseAllList()
  })
  return houseList
}
export const peopleTable = [
  { value: 'code', label: '栋数编号' },
  { value: 'community.name', label: '小区名称' },
  { value: 'name', label: '栋数名称' },
  { value: 'lift', label: '电梯数' },
  { value: 'create_time', label: '创建时间' },
]
